package com.raquel.splash;


import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

public class SplashActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);
    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.splash, menu);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
    	getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,  
    			WindowManager.LayoutParams.FLAG_FULLSCREEN);
    	return true;
    }
    public void openActivity (View v){
    	try{
    	
    	Log.d("Raquel", "Opening another activity");
    	Intent intent = new Intent(this, MainActivity.class);
    	intent.putExtra("extraValue", "Hello");
    	startActivity(intent);
    	
    	}catch(Exception ex){
    		Log.d("Raquel", ex.getMessage());
    	}
    }
    /**
     * 
     * @param v
     */
    public void openActivityResult (View v){
    	Intent intent = new Intent(this, ChildActivity.class);
    	startActivityForResult(intent, 666);
    }
    
}
